package org.eddycar.jproyeddycar.contrato.vistas;

import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
import org.eddycar.jproyeddycar.comun.dao.DaoCliente;
import org.eddycar.jproyeddycar.comun.modelo.Cliente;
import org.eddycar.jproyeddycar.negocio.Control;
import org.jdesktop.observablecollections.ObservableList;

public class VistaBuscarCliente extends javax.swing.JDialog {

    Cliente cli = new Cliente();
    DaoCliente dc;
    Control verificarCedula = new Control();

    public VistaBuscarCliente() {
        initComponents();
        setLocationRelativeTo(this);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        buttonGroup1 = new javax.swing.ButtonGroup();
        entityManager1 = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("jproyeddycarPU").createEntityManager();
        query1 = java.beans.Beans.isDesignTime() ? null : entityManager1.createQuery("SELECT c FROM Cliente c");
        list1 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query1.getResultList());
        panelImage1 = new org.edisoncor.gui.panel.PanelImage();
        jLabel21 = new javax.swing.JLabel();
        panelRound1 = new org.edisoncor.gui.panel.PanelRound();
        jLabel1 = new javax.swing.JLabel();
        cbxTipo = new javax.swing.JComboBox();
        txtCedula = new javax.swing.JTextField();
        btnBuscarCliente = new javax.swing.JButton();
        panelRect1 = new org.edisoncor.gui.panel.PanelRect();
        Grupo = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        lblNombreC = new javax.swing.JLabel();
        lblTelefonoDomC = new javax.swing.JLabel();
        lblEstadoCivilC = new javax.swing.JLabel();
        lblTelfCelC = new javax.swing.JLabel();
        lblApellidoC = new javax.swing.JLabel();
        lblDireccionC = new javax.swing.JLabel();
        txtNombreC = new javax.swing.JTextField();
        txtEdadC = new javax.swing.JTextField();
        txtEstadoCivilC = new javax.swing.JTextField();
        txtTelefonoC = new javax.swing.JTextField();
        txtCelularC = new javax.swing.JTextField();
        txtDireccionTrabajoC = new javax.swing.JTextField();
        lblDireccionC1 = new javax.swing.JLabel();
        txtDireccionDomicilioC = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        lblNombreC1 = new javax.swing.JLabel();
        lblTelefonoDomC1 = new javax.swing.JLabel();
        lblEstadoCivilC1 = new javax.swing.JLabel();
        lblTelfCelC1 = new javax.swing.JLabel();
        lblApellidoC1 = new javax.swing.JLabel();
        lblDireccionC2 = new javax.swing.JLabel();
        txtNombreCY = new javax.swing.JTextField();
        txtEdadCY = new javax.swing.JTextField();
        txtEstadoCivilCY = new javax.swing.JTextField();
        txtTelefonoCY = new javax.swing.JTextField();
        txtCelularCY = new javax.swing.JTextField();
        txtDireccionTrabajoCY = new javax.swing.JTextField();
        lblDireccionC3 = new javax.swing.JLabel();
        txtDireccionDomicilioCY = new javax.swing.JTextField();
        txtCedulaCY = new javax.swing.JTextField();
        lblApellidoC3 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        lblNombreC2 = new javax.swing.JLabel();
        lblTelefonoDomC2 = new javax.swing.JLabel();
        lblEstadoCivilC2 = new javax.swing.JLabel();
        lblTelfCelC2 = new javax.swing.JLabel();
        lblApellidoC2 = new javax.swing.JLabel();
        lblDireccionC4 = new javax.swing.JLabel();
        txtNombreG = new javax.swing.JTextField();
        txtEdadG = new javax.swing.JTextField();
        txtEstadoCivilG = new javax.swing.JTextField();
        txtTelefonoG = new javax.swing.JTextField();
        txtCelularG = new javax.swing.JTextField();
        txtDireccionTrabajoG = new javax.swing.JTextField();
        lblDireccionC5 = new javax.swing.JLabel();
        txtDireccionDomicilioG = new javax.swing.JTextField();
        txtCedulaG = new javax.swing.JTextField();
        lblApellidoC4 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButton2 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("NUEVO REGISTRO");
        setModal(true);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        panelImage1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/eddycar/jproyeddycar/negocio/Imagenes/pantalla.jpg"))); // NOI18N

        jLabel21.setFont(new java.awt.Font("Gastada", 1, 24));
        jLabel21.setForeground(new java.awt.Color(255, 255, 255));
        jLabel21.setText("Informacion cliente");

        jLabel1.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Bucar Cliente Por:");

        cbxTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cedula", "Nombre o Apellido", "TODOS" }));

        btnBuscarCliente.setText("Buscar");
        btnBuscarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarClienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelRound1Layout = new javax.swing.GroupLayout(panelRound1);
        panelRound1.setLayout(panelRound1Layout);
        panelRound1Layout.setHorizontalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRound1Layout.createSequentialGroup()
                        .addComponent(cbxTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 130, Short.MAX_VALUE)
                        .addComponent(btnBuscarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtCedula, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE))
                .addContainerGap())
        );
        panelRound1Layout.setVerticalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1)
                    .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbxTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscarCliente))
                .addContainerGap(23, Short.MAX_VALUE))
        );

        jPanel2.setOpaque(false);

        lblNombreC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblNombreC.setText("Nombres:");

        lblTelefonoDomC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelefonoDomC.setText("Tel. Domicilio:");

        lblEstadoCivilC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblEstadoCivilC.setText("Estado Civil:");

        lblTelfCelC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelfCelC.setText("Celular:");

        lblApellidoC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblApellidoC.setText("Edad:");

        lblDireccionC.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC.setText("Dirección Dom:");

        txtNombreC.setEditable(false);

        txtEdadC.setEditable(false);

        txtEstadoCivilC.setEditable(false);

        txtTelefonoC.setEditable(false);

        txtCelularC.setEditable(false);

        txtDireccionTrabajoC.setEditable(false);

        lblDireccionC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC1.setText("Dirección Trab:");

        txtDireccionDomicilioC.setEditable(false);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDireccionC1)
                    .addComponent(lblDireccionC)
                    .addComponent(lblTelefonoDomC)
                    .addComponent(lblEstadoCivilC)
                    .addComponent(lblApellidoC)
                    .addComponent(lblNombreC))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtEdadC, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtEstadoCivilC, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtTelefonoC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTelfCelC)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtCelularC, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(txtDireccionTrabajoC, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtDireccionDomicilioC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))
                    .addComponent(txtNombreC, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(135, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNombreC)
                    .addComponent(txtNombreC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblApellidoC)
                    .addComponent(txtEdadC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstadoCivilC)
                    .addComponent(txtEstadoCivilC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTelefonoDomC)
                    .addComponent(txtTelefonoC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelfCelC)
                    .addComponent(txtCelularC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC)
                    .addComponent(txtDireccionDomicilioC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC1)
                    .addComponent(txtDireccionTrabajoC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        Grupo.addTab("Datos del Cliente", jPanel2);

        jPanel3.setOpaque(false);

        lblNombreC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblNombreC1.setText("Nombres:");

        lblTelefonoDomC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelefonoDomC1.setText("Tel. Domicilio:");

        lblEstadoCivilC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblEstadoCivilC1.setText("Estado Civil:");

        lblTelfCelC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelfCelC1.setText("Celular:");

        lblApellidoC1.setFont(new java.awt.Font("Raavi", 1, 12));
        lblApellidoC1.setText("Edad:");

        lblDireccionC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC2.setText("Dirección Dom:");

        txtNombreCY.setEditable(false);

        txtEdadCY.setEditable(false);

        txtEstadoCivilCY.setEditable(false);

        txtTelefonoCY.setEditable(false);

        txtCelularCY.setEditable(false);

        txtDireccionTrabajoCY.setEditable(false);

        lblDireccionC3.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC3.setText("Dirección Trab:");

        txtDireccionDomicilioCY.setEditable(false);

        txtCedulaCY.setEditable(false);

        lblApellidoC3.setFont(new java.awt.Font("Raavi", 1, 12));
        lblApellidoC3.setText("Cedula:");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDireccionC3)
                    .addComponent(lblDireccionC2)
                    .addComponent(lblTelefonoDomC1)
                    .addComponent(lblEstadoCivilC1)
                    .addComponent(lblApellidoC1)
                    .addComponent(lblNombreC1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtEstadoCivilCY, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtTelefonoCY, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTelfCelC1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtCelularCY, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(txtDireccionTrabajoCY, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtDireccionDomicilioCY, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                            .addComponent(txtEdadCY, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblApellidoC3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(txtCedulaCY, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(txtNombreCY, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(135, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNombreC1)
                    .addComponent(txtNombreCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblApellidoC1)
                    .addComponent(txtEdadCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCedulaCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblApellidoC3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstadoCivilC1)
                    .addComponent(txtEstadoCivilCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTelefonoDomC1)
                    .addComponent(txtTelefonoCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelfCelC1)
                    .addComponent(txtCelularCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC2)
                    .addComponent(txtDireccionDomicilioCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC3)
                    .addComponent(txtDireccionTrabajoCY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        Grupo.addTab("Conyuge", jPanel3);

        jPanel9.setOpaque(false);

        lblNombreC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblNombreC2.setText("Nombres:");

        lblTelefonoDomC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelefonoDomC2.setText("Tel. Domicilio:");

        lblEstadoCivilC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblEstadoCivilC2.setText("Estado Civil:");

        lblTelfCelC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblTelfCelC2.setText("Celular:");

        lblApellidoC2.setFont(new java.awt.Font("Raavi", 1, 12));
        lblApellidoC2.setText("Edad:");

        lblDireccionC4.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC4.setText("Dirección Dom:");

        txtNombreG.setEditable(false);

        txtEdadG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtEdadG.setEnabled(false);

        txtEstadoCivilG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtEstadoCivilG.setEnabled(false);

        txtTelefonoG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtTelefonoG.setEnabled(false);

        txtCelularG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtCelularG.setEnabled(false);

        txtDireccionTrabajoG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtDireccionTrabajoG.setEnabled(false);

        lblDireccionC5.setFont(new java.awt.Font("Raavi", 1, 12));
        lblDireccionC5.setText("Dirección Trab:");

        txtDireccionDomicilioG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtDireccionDomicilioG.setEnabled(false);

        txtCedulaG.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        txtCedulaG.setEnabled(false);

        lblApellidoC4.setFont(new java.awt.Font("Raavi", 1, 12));
        lblApellidoC4.setText("Cedula:");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblDireccionC5)
                    .addComponent(lblDireccionC4)
                    .addComponent(lblTelefonoDomC2)
                    .addComponent(lblEstadoCivilC2)
                    .addComponent(lblApellidoC2)
                    .addComponent(lblNombreC2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtEstadoCivilG, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtTelefonoG, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTelfCelC2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtCelularG, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(txtDireccionTrabajoG, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtDireccionDomicilioG, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout.createSequentialGroup()
                            .addComponent(txtEdadG, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
                            .addComponent(lblApellidoC4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(txtCedulaG, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(txtNombreG, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(135, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNombreC2)
                    .addComponent(txtNombreG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblApellidoC2)
                    .addComponent(txtEdadG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCedulaG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblApellidoC4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstadoCivilC2)
                    .addComponent(txtEstadoCivilG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTelefonoDomC2)
                    .addComponent(txtTelefonoG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelfCelC2)
                    .addComponent(txtCelularG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC4)
                    .addComponent(txtDireccionDomicilioG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionC5)
                    .addComponent(txtDireccionTrabajoG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        Grupo.addTab("Garante", jPanel9);

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listCliente}");
        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, eLProperty, jTable1);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${cedula}"));
        columnBinding.setColumnName("Cedula");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombres}"));
        columnBinding.setColumnName("Nombres");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apellidos}"));
        columnBinding.setColumnName("Apellidos");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${garante}"));
        columnBinding.setColumnName("Garante");
        columnBinding.setColumnClass(org.eddycar.jproyeddycar.comun.modelo.Garante.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 471, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(33, Short.MAX_VALUE))
        );

        Grupo.addTab("Lista de Clientes Encontrados", jPanel1);

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list1, jTable2);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${cedula}"));
        columnBinding.setColumnName("Cedula");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombres}"));
        columnBinding.setColumnName("Nombres");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apellidos}"));
        columnBinding.setColumnName("Apellidos");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${telefonoCedlular}"));
        columnBinding.setColumnName("Telefono Cedlular");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${telefonoDomicilio}"));
        columnBinding.setColumnName("Telefono Domicilio");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${direccionDomicilio}"));
        columnBinding.setColumnName("Direccion Domicilio");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane2.setViewportView(jTable2);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 509, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 254, Short.MAX_VALUE)
                .addContainerGap())
        );

        Grupo.addTab("TODOS", jPanel5);

        javax.swing.GroupLayout panelRect1Layout = new javax.swing.GroupLayout(panelRect1);
        panelRect1.setLayout(panelRect1Layout);
        panelRect1Layout.setHorizontalGroup(
            panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRect1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Grupo, javax.swing.GroupLayout.PREFERRED_SIZE, 521, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelRect1Layout.setVerticalGroup(
            panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRect1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Grupo, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(8, Short.MAX_VALUE))
        );

        Grupo.getAccessibleContext().setAccessibleName("Cliente");

        jButton2.setText("Cerrar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Criterio de Búqueda");

        jLabel3.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("Resultado de Búsqueda:");

        javax.swing.GroupLayout panelImage1Layout = new javax.swing.GroupLayout(panelImage1);
        panelImage1.setLayout(panelImage1Layout);
        panelImage1Layout.setHorizontalGroup(
            panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addGroup(panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImage1Layout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel21))
                    .addGroup(panelImage1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(panelRound1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(13, Short.MAX_VALUE))
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addContainerGap(384, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImage1Layout.createSequentialGroup()
                .addContainerGap(243, Short.MAX_VALUE)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(232, 232, 232))
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelRect1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );
        panelImage1Layout.setVerticalGroup(
            panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addGroup(panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(panelImage1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImage1Layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel2)
                        .addGap(3, 3, 3)))
                .addComponent(panelRound1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(4, 4, 4)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelRect1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(panelImage1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 570, 550));

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuscarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarClienteActionPerformed
        listCliente.clear();
        if (cbxTipo.getSelectedIndex() == 0) {
            try {
                if (verificarCedula.verificaCedulaRuc(txtCedula.getText().toString()) == true || (dc.buscarId(txtCedula.getText()).getCedula().equals(txtCedula.getText())) == true) {
                    dc = new DaoCliente();
                    String cedula = txtCedula.getText();
                    cli = dc.buscarId(cedula);
                    txtCelularC.setText(cli.getTelefonoCedlular());
                    txtDireccionDomicilioC.setText(cli.getDireccionDomicilio());
                    txtDireccionTrabajoC.setText(cli.getDireccionTrabajo());
                    txtEdadC.setText(String.valueOf(cli.getEdad()));
                    txtEstadoCivilC.setText(String.valueOf(cli.getEstado()));
                    txtNombreC.setText(cli.getNombres() + " " + cli.getApellidos());
                    txtTelefonoC.setText(cli.getTelefonoDomicilio());
                    if (cli.getConyuge() != null) {
                        txtCedulaCY.setText(cli.getConyuge().getCedula());
                        txtCelularCY.setText(cli.getConyuge().getTelefonoCedlular());
                        txtDireccionDomicilioCY.setText(cli.getConyuge().getDireccionDomicilio());
                        txtDireccionTrabajoCY.setText(cli.getConyuge().getDireccionTrabajo());
                        txtEdadCY.setText(String.valueOf(cli.getConyuge().getEdad()));
                        txtEstadoCivilCY.setText(String.valueOf(cli.getConyuge().getEstado()));
                        txtNombreCY.setText(cli.getConyuge().getNombres() + " " + cli.getConyuge().getApellidos());
                        txtTelefonoCY.setText(cli.getConyuge().getTelefonoDomicilio());
                    }
                    txtCedulaG.setText(cli.getGarante().getCedula());
                    txtCelularG.setText(cli.getGarante().getTelefonoCedlular());
                    txtDireccionDomicilioG.setText(cli.getGarante().getDireccionDomicilio());
                    txtDireccionTrabajoG.setText(cli.getGarante().getDireccionTrabajo());
                    txtEdadG.setText(String.valueOf(cli.getGarante().getEdad()));
                    txtEstadoCivilG.setText(String.valueOf(cli.getGarante().getEstado()));
                    txtNombreG.setText(cli.getGarante().getNombres() + " " + cli.getGarante().getApellidos());
                    txtTelefonoG.setText(cli.getGarante().getTelefonoDomicilio());
                    Grupo.setSelectedIndex(0);
                } else {
                    JOptionPane.showMessageDialog(this, "Cedula Incorrecta", "Error de Datos", JOptionPane.ERROR_MESSAGE);
                    txtCedula.setText("");
                }
            } catch (NullPointerException e) {
                JOptionPane.showMessageDialog(this, "Cliente no encontrado en el Sistema", "Error de Búsqueda", JOptionPane.ERROR_MESSAGE);
            }
        } else {
            if (cbxTipo.getSelectedIndex() == 1) {
                try {
                    dc = new DaoCliente();
                    String cedula = txtCedula.getText();
                    listCliente.addAll(dc.buscarNombreCliente(cedula));
                    Grupo.setSelectedIndex(3);
                } catch (NullPointerException e) {
                    JOptionPane.showMessageDialog(this, "Ningún Cliente encontrado en el Sistema", "Error de Búsqueda", JOptionPane.ERROR_MESSAGE);
                }
            } else {
                if (cbxTipo.getSelectedIndex() == 2) {
                    Grupo.setSelectedIndex(4);
                }
            }
        }
    }//GEN-LAST:event_btnBuscarClienteActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        dispose();
    }//GEN-LAST:event_jButton2ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane Grupo;
    private javax.swing.JButton btnBuscarCliente;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbxTipo;
    private javax.persistence.EntityManager entityManager1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JLabel lblApellidoC;
    private javax.swing.JLabel lblApellidoC1;
    private javax.swing.JLabel lblApellidoC2;
    private javax.swing.JLabel lblApellidoC3;
    private javax.swing.JLabel lblApellidoC4;
    private javax.swing.JLabel lblDireccionC;
    private javax.swing.JLabel lblDireccionC1;
    private javax.swing.JLabel lblDireccionC2;
    private javax.swing.JLabel lblDireccionC3;
    private javax.swing.JLabel lblDireccionC4;
    private javax.swing.JLabel lblDireccionC5;
    private javax.swing.JLabel lblEstadoCivilC;
    private javax.swing.JLabel lblEstadoCivilC1;
    private javax.swing.JLabel lblEstadoCivilC2;
    private javax.swing.JLabel lblNombreC;
    private javax.swing.JLabel lblNombreC1;
    private javax.swing.JLabel lblNombreC2;
    private javax.swing.JLabel lblTelefonoDomC;
    private javax.swing.JLabel lblTelefonoDomC1;
    private javax.swing.JLabel lblTelefonoDomC2;
    private javax.swing.JLabel lblTelfCelC;
    private javax.swing.JLabel lblTelfCelC1;
    private javax.swing.JLabel lblTelfCelC2;
    private java.util.List<org.eddycar.jproyeddycar.comun.modelo.Cliente> list1;
    private org.edisoncor.gui.panel.PanelImage panelImage1;
    private org.edisoncor.gui.panel.PanelRect panelRect1;
    private org.edisoncor.gui.panel.PanelRound panelRound1;
    private javax.persistence.Query query1;
    private javax.swing.JTextField txtCedula;
    private javax.swing.JTextField txtCedulaCY;
    private javax.swing.JTextField txtCedulaG;
    private javax.swing.JTextField txtCelularC;
    private javax.swing.JTextField txtCelularCY;
    private javax.swing.JTextField txtCelularG;
    private javax.swing.JTextField txtDireccionDomicilioC;
    private javax.swing.JTextField txtDireccionDomicilioCY;
    private javax.swing.JTextField txtDireccionDomicilioG;
    private javax.swing.JTextField txtDireccionTrabajoC;
    private javax.swing.JTextField txtDireccionTrabajoCY;
    private javax.swing.JTextField txtDireccionTrabajoG;
    private javax.swing.JTextField txtEdadC;
    private javax.swing.JTextField txtEdadCY;
    private javax.swing.JTextField txtEdadG;
    private javax.swing.JTextField txtEstadoCivilC;
    private javax.swing.JTextField txtEstadoCivilCY;
    private javax.swing.JTextField txtEstadoCivilG;
    private javax.swing.JTextField txtNombreC;
    private javax.swing.JTextField txtNombreCY;
    private javax.swing.JTextField txtNombreG;
    private javax.swing.JTextField txtTelefonoC;
    private javax.swing.JTextField txtTelefonoCY;
    private javax.swing.JTextField txtTelefonoG;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
    private List<Cliente> listaClientes = new ArrayList<Cliente>();

    public List<Cliente> getListaClientes() {
        return listaClientes;
    }

    public void setListaClientes(List<Cliente> listaClientes) {
        this.listaClientes = listaClientes;
    }
    ObservableList<Cliente> listCliente = org.jdesktop.observablecollections.ObservableCollections.observableList(listaClientes);

    public ObservableList<Cliente> getListCliente() {
        return listCliente;
    }

    public void setListCliente(ObservableList<Cliente> listCliente) {
        this.listCliente = listCliente;
    }
}
